Refactor and use environment variables#9
Merged
Conversation
flaskapp.py now relies less on making HTTP requests and is more DRY (Don't Repeat Yourself) by using the new mathpix.py and latex_solver.py modules.
See instructions in mathpix-variables.env.example for how to add environment variables
- Made a specific note to help users add the environment variables. - Moved some of the documentation to a separate folder. - Made a note of the docker documentation from the README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello! 👋
I made a couple changes, most of which are described in detail in the commit history. In summary, I refactored
flaskapp.pyto use external methods for mathpix and latex processing in order to try to reduce the code duplication. Second, I changed the mathpix code to remove the API keys from the version control and instead use environment variables, which are not included in source control. I have instructions inmathpix-variables.env.example.Let me know if you have any questions or if I should create two pull requests for the two changes instead of just one.